package com.minyon_web_admin.shiro;

import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.apache.shiro.authc.credential.SimpleCredentialsMatcher;

public class CustomCredentialsMatcher extends HashedCredentialsMatcher  {
	@Override  
    public boolean doCredentialsMatch(AuthenticationToken authcToken, AuthenticationInfo info) {  
		
		/*UsernamePasswordToken  token=(UsernamePasswordToken)authcToken;
		//将用户输入的密码进行md5加密
		 Object tokenCredentials = StringUtil.EncryptMD5(String.valueOf(token.getPassword())); 
		 Object userName=String.valueOf(token.getPrincipal());
		 
		 Object accountCredentials = getCredentials(info);  */
		 
		return super.doCredentialsMatch(authcToken, info);
		
	}
}
